import { request, API_URL } from './request'

// 通用下拉
export const lablePullDown = (moduleCode) => {
  return request.get(`${API_URL}/hrplat/talentpool/rest/label/pullDown?moduleCode=${moduleCode}`)
}

// 条线下拉
export const lableLinePullDown = (params) => {
  return request.get(`${API_URL}/hrplat/talentpool/rest/label/linePullDown`, { params })
}

// 标签分类
export const lableGetFirstSort = () => {
  return request.get(`${API_URL}/hrplat/talentpool/rest/label/getFirstSort`)
}

// 标签类型
export const lableGetSecondSort = (fieldCode) => {
  return request.get(`${API_URL}/hrplat/talentpool/rest/label/getSecondSort?fieldCode=${fieldCode}`)
}

// 条件查询标签类别
export const lableQueryLabelType = (data) => {
  return request.post(`${API_URL}/hrplat/talentpool/rest/label/queryLabelType`, data)
}

// 新增标签类别
export const lableAddLabelType = (data) => {
  return request.post(`${API_URL}/hrplat/talentpool/rest/label/addLabelType`, data)
}

// 修改标签类别
export const lableEditLabelType = (data) => {
  return request.post(`${API_URL}/hrplat/talentpool/rest/label/editLabelType`, data)
}

// 标签类别详情
export const lableQueryLabelTypeDetail = (id) => {
  return request.get(`${API_URL}/hrplat/talentpool/rest/label/queryLabelTypeDetail?id=${id}`)
}

// 禁用标签
export const lableDisableType = (id) => {
  return request.get(`${API_URL}/hrplat/talentpool/rest/label/disableType?id=${id}`)
}

// 启用标签
export const lableEnableType = (id) => {
  return request.get(`${API_URL}/hrplat/talentpool/rest/label/enableType?id=${id}`)
}

// 删除标签
export const lableDeleteType = (id) => {
  return request.get(`${API_URL}/hrplat/talentpool/rest/label/deleteType?id=${id}`)
}
